Different types of memory cards, such as Compact Flash, Secure Digital or multimedia cards (MMC), are used in various small electronic devices such as personal digital assistants (PDA) or mobile terminals to store data. This data can be for example a program that is run on the device or data stored by the user.
Sometimes it is necessary to store two different kinds of data to the same card. These situations are for example when application data (a game or the operating system of the device) and user data are stored on the same card or when some part of the data is data stored by the card vendor, for example support of telephone numbers of a network operator, in addition to the data stored by the user.
When there is provided space in the memory card, for example in the MMC, for the user storable data in addition for the application data, the user does not have to carry two separate cards for the application and his own data. Sometimes it is even impossible to use two separate cards without the device in use having two separate MMC slots.
It is desirable that the data stored initially (application data, support telephone numbers) are not accidentally or consciously deleted by the user. This write protected portion of the MMC should act as a ROM-portion to the user. However, according to the MMC specification a memory type multimedia card is either a Read Only Memory (ROM) card or a Read/Write (RW) card. This means that only whole card can be initially permanently write protected. When using RW cards the user can alter the initially added content at later stage.
The MMC specification offers one solution to this kind of problem. It is possible to write protect a portion of the MMC. First the segment size to be protected is defined in the units of WP_GRP_SIZE groups as specified in the CSD (Card Specific Data) register. The write protection of the addressed write-protect group is then done using the SET_WRITE_PROT command.
The drawback of this method is that it does not allow the portion of the MMC to be permanently write protected. The write protection can be cancelled using CLR_WRITE_PROTECT command to the addressed write-protect group. Permanent write protection can only be set to the entire card by setting a permanent write protection bit (PERM_WRITE_PROTECT) in the CSD.